<template>
  <Start @handler="handlers" />
</template>

<script setup lang="ts">
import { ElMessage } from 'element-plus'
// import { getLoginAPI } from '@/request'
import { useRouter } from 'vue-router'
// import { sha256 } from 'js-sha256';

const router = useRouter()

const handlers = async (num:Array<{ value:string }>) => {
  // const data = await getLoginAPI(num[0].value, sha256(num[1].value))

  // if ((data as any).code == 10000) {
  //   ElMessage.success("登录成功！")
  //   localStorage.setItem("ust", "Bearer " + data.data)
  //   router.push("/home")
  // } else ElMessage.warning((data as any).msg)

  console.log(num)
}
</script>

<style lang="less" scoped>

</style>